/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.mes.action.produce;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.mes.mapper.produce.SpareDetMapper;
public class SpareDet extends BaseAction
{
    @Autowired(required=false)
	private SpareDetMapper mapper;
    /**
    备件信息
    */
    
    public Map spareDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce_info=mapper.produce_info(params);
        SQLMap produce_info_emt=produce_info.getExistfirst();
        result.put("produce_info", produce_info_emt);
        
        
        SQLList<SQLMap> produce_backup=mapper.produce_backup(params);
        result.put("produce_backup", produce_backup);
        
        return result;
    }
    /**
    备件详情
    */
    
    public Map spareDetails() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> pb_info=mapper.pb_info(params);
        SQLMap pb_info_emt=pb_info.getExistfirst();
        result.put("pb_info", pb_info_emt);
        
        return result;
    }
    /**
    修改备件
    */
    
    public Map spareUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> pb_info=mapper.pb_info(params);
        SQLMap pb_info_emt=pb_info.getExistfirst();
        result.put("pb_info", pb_info_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_pb() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_pb(params);
        
        return result;
    }
    /**
    增加备件修改
    */
    
    public Map spareAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int pbid = mapper.pbid(params);
        result.put("pbid", pbid);
        
        return result;
    }
    /**
    修改备件修改
    */
    
    public Map spareUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.spareUpSubmit(params);
        
        return result;
    }
}